<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>添加/修改季度调查统计季度（变更表）表三</title>
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/bootstrap.min.css?v=3.3.5"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/font-awesome.min.css?v=4.4.0"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/animate.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/style.min.css?v=4.0.0"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/plugins/toastr/toastr.min.css"
	rel="stylesheet">

<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/plugins/iCheck/custom.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/views/sysdefault/css/table_style.css"
	rel="stylesheet">
</head>

<body class="gray-bg">

	<div class="animated fadeInRight">
		<div class="row">
			<div class="col-xs-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<!-- <h5>添加/修改新闻</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a>
						</div> -->
						<ul class="nav nav-tabs">
							<li class="active"><a data-toggle="tab" href="#tab-1"><i
									class="fa fa-user"></i>调查统计季报表三（变更表）—— 添加</a></li>
									<div class="col-lg-7 col-md-7 col-sm-3 col-xs-1"></div>
                    		<button type="button" class="btn btn-success glyphicon glyphicon-triangle-left btn-sm 
                    		col-lg-1 col-md-1 col-sm-3 col-xs-3" onclick="backList();">
                    		返回</button>

						</ul>
					</div>

					<div class="ibox-content">
						<input type="hidden" id="fileUploadIp" value="${fileUploadIp}" />
						<input type="hidden" id="imageInfo" value="${news.imageUrl}" />
						<form
							action="<%=request.getContextPath()%>/bgGlutTableThreeChange/addTable.do"
							id="subForm" method="post" class="form-horizontal"
							onsubmit="return beforeSub();" enctype="multipart/form-data">
							<input type="hidden" id="tableId" name="tableId"
								value="${threeChange.tableId}" /> <input type="hidden"
								id="status" name="status" value="1" />

							<div class="table-responsive tab-content">

								<!-- *************新闻tab页**************** -->
								<div id="tab-1" class="tab-pane active">
									<div class="full-height-scroll">
									
									<div class="form-group col-lg-12 col-md-12  col-sm-12 col-xs-12">
											<div class="col-lg-12 col-md-12  col-sm-12 col-xs-12">
											    <label class="control-label col-lg-2 col-md-2  col-sm-12 col-xs-12 ">呈报单位及呈报人:</label>
												<label class="control-label col-lg-5 col-md-5 col-sm-12 col-xs-12 " style="text-align:left;">${threeChange.company}&nbsp;&nbsp;&nbsp;&nbsp;${threeChange.DReportP}</label>
												<label class="control-label col-lg-3 col-md-3 col-sm-12 col-xs-12">填报日期:</label>
											    <label class="control-label col-lg-2 col-md-2 col-sm-12 col-xs-12 time"  style="text-align:left;">
											    <input type="hidden" id="reportTime" name="reportTime" />
											    </label>
											    <input type="hidden" id="id_userID" name="userId" value="${userId}" />
											</div>
									</div>
										<%-- <div class="form-group col-lg-6 col-md-6 col-sm-12 col-xs-12">
											<label class="col-xs-4 control-label" style="text-align:center">呈报单位及呈报人:</label>
											<div class="col-xs-4">
												<span class="myspan">${threeChange.company}</span>
												<input type="hidden" name="company" value="${threeChange.company}"/>										
											</div>
											<div class="col-xs-4">
												<span class="myspan">${threeChange.DReportP}</span>	
												<input type="hidden" name="DReportP" value="${threeChange.DReportP}"/>								
											</div>
										</div>
										<div class="form-group col-lg-6 col-md-6 col-sm-12 col-xs-12" id="data_1">
											<label class="control-label col-xs-5"style="text-align:center">填报日期</label>
											<input type="hidden" id="reportTime" name="reportTime" /> 
											<label class="col-xs-7 control-label time" style="text-align:left"></label>
										</div> --%>
										
										
										<div class="row div-table" >
											<!-- 大屏时显示 -->
											<div class="col-lg-2 col-md-2 hidden-sm hidden-xs" style="height: 74px;">
												<div class="subwrap">
													<div class="content">第一季度</div>
												</div>
											</div>
											<!-- 小屏时显示 -->
											<div class="col-sm-12 col-xs-12 hidden-lg hidden-md min-height">
												<div class="subwrap">
													<div class="content">第一季度</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">有无变动</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
														<input class="Quarter" type="hidden" value="1">
														<input type="text" name="firChange"
														placeholder="建议在100字以内。" class="table_input_style"
														required="" style="background-color: gainsboro;"
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.firChange}" disabled>
													</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">具体说明</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
														<input class="Quarter" type="hidden" value="1">
														<input type="text"
														name="firInf" placeholder="建议在100字以内。"
														class="table_input_style" required="" style="background-color: gainsboro;"
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.firInf}" disabled>
													</div>
												</div>
											</div>
											
											
											<!-- 大屏时显示 -->
											<div class="col-lg-2 col-md-2 hidden-sm hidden-xs" style="height: 74px;">
												<div class="subwrap">
													<div class="content">第二季度</div>
												</div>
											</div>
											<!-- 小屏时显示 -->
											<div class="col-sm-12 col-xs-12 hidden-lg hidden-md min-height">
												<div class="subwrap">
													<div class="content">第二季度</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">有无变动</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
														<input class="Quarter" type="hidden" value="2">
														<input type="text" style="background-color: gainsboro;"
														name="secChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.secChange}" disabled>
													</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">具体说明</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
														<input class="Quarter" type="hidden" value="2">
														<input type="text" style="background-color: gainsboro;"
														name="secInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.secInf}" disabled>
													</div>
												</div>
											</div>
											
											
											<!-- 大屏时显示 -->
											<div class="col-lg-2 col-md-2 hidden-sm hidden-xs" style="height: 74px;">
												<div class="subwrap">
													<div class="content">第三季度</div>
												</div>
											</div>
											<!-- 小屏时显示 -->
											<div class="col-sm-12 col-xs-12 hidden-lg hidden-md min-height">
												<div class="subwrap">
													<div class="content">第三季度</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">有无变动</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
													 <input class="Quarter" type="hidden" value="3">
														<input type="text" style="background-color: gainsboro;"
														name="thiChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.thiChange}" disabled>
													</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">具体说明</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
													 <input class="Quarter" type="hidden" value="3">
														<input type="text" style="background-color: gainsboro;"
														name="thiInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.thiInf}" disabled>
													</div>
												</div>
											</div>
											
											
											<!-- 大屏时显示 -->
											<div class="col-lg-2 col-md-2 hidden-sm hidden-xs" style="height: 74px;">
												<div class="subwrap">
													<div class="content">第四季度</div>
												</div>
											</div>
											<!-- 小屏时显示 -->
											<div class="col-sm-12 col-xs-12 hidden-lg hidden-md min-height">
												<div class="subwrap">
													<div class="content">第四季度</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">有无变动</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
													<input class="Quarter" type="hidden" value="4">
														<input type="text" style="background-color: gainsboro;"
														name="fouChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.fouChange}" disabled>
													</div>
												</div>
											</div>
											<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12 min-height" style="height: 37px;">
												<div class="subwrap">
													<div class="content">具体说明</div>
												</div>
											</div>
											<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 min-height" style="padding: 0px;">
												<div class="subwrap">
													<div class="content">
													<input class="Quarter" type="hidden" value="4">
														<input type="text" style="background-color: gainsboro;"
														name="fouInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.fouInf}" disabled>
													</div>
												</div>
											</div>
											
											
											<!-- 大屏时显示 -->
											<div class="col-lg-2 col-md-2 hidden-sm hidden-xs" style="height: 96px;">
												<div class="subwrap">
													<div class="content">其他说明</div>
												</div>
											</div>
											<!-- 小屏时显示 -->
											<div class="col-sm-12 col-xs-12 hidden-lg hidden-md min-height">
												<div class="subwrap">
													<div class="content">其他说明</div>
												</div>
											</div>
											<div class="col-lg-10 col-md-10 col-sm-12 col-xs-12">
												<div class="subwrap">
													<div class="content">
														<textarea
															class="form-control text_style" rows="2" name="other"
															id="" value="${threeChange.other}"
															maxlength="300" style="outline:none;resize:none;"
															onchange="this.value=this.value.substring(0, 300)" 
															onkeydown="this.value=this.value.substring(0, 300)" 
															onkeyup="this.value=this.value.substring(0, 300)"></textarea>
													</div>
												</div>
											</div>
											
										</div>
										
										
										<%-- <div class="col-xs-12">
											<table class="table table-bordered">
												<tr>
													<td class="label_style col-xs-2" rowspan="2">第一季度<input class="Quarter" type="hidden" value="1"></td>
													<td class="label_style col-xs-2">有无变动</td>
													<td class="label_style col-xs-8" style="padding: 0px">
														<input type="text" name="firChange"
														placeholder="建议在100字以内。" class="table_input_style"
														required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.firChange}" disabled>
													</td>

												</tr>
												<tr>
													<td class="label_style">具体说明</td>
													<td style="padding: 0px"><input type="text"
														name="firInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.firInf}" disabled></td>
												</tr>
												<tr>
													<td class="label_style" rowspan="2">第二季度<input class="Quarter" type="hidden" value="2"></td>
													<td class="label_style">有无变动</td>
													<td style="padding: 0px"><input type="text"
														name="secChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.secChange}" disabled></td>

												</tr>
												<tr>
													<td class="label_style">具体说明</td>
													<td style="padding: 0px"><input type="text"
														name="secInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.secInf}" disabled></td>
												</tr>
												<tr>
													<td class="label_style" rowspan="2">第三季度 <input class="Quarter" type="hidden" value="3"></td>
													<td class="label_style">有无变动</td>
													<td style="padding: 0px"><input type="text"
														name="thiChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.thiChange}" disabled></td>

												</tr>
												<tr>
													<td class="label_style">具体说明</td>
													<td style="padding: 0px"><input type="text"
														name="thiInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.thiInf}" disabled></td>
												</tr>
												<tr>
													<td class="label_style" rowspan="2">第四季度<input class="Quarter" type="hidden" value="4"></td>
													<td class="label_style">有无变动</td>
													<td style="padding: 0px"><input type="text"
														name="fouChange" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.fouChange}" disabled></td>

												</tr>
												<tr>
													<td class="label_style">具体说明</td>
													<td style="padding: 0px"><input type="text"
														name="fouInf" placeholder="建议在100字以内。"
														class="table_input_style" required=""
														onkeyup="javascript:setShowLength(this, 100, 'cost_tpl_title_length');"
														maxlength="100" value="${threeChange.fouInf}" disabled></td>
												</tr>
												<tr>
													<td class="label_style" rowspan="2">其他说明</td>
													<td class="label_style" rowspan="2" colspan="2"><textarea
															class="form-control text_style" rows="2" name="other"
															id="" value="${threeChange.other}"
															maxlength="300"
															onchange="this.value=this.value.substring(0, 300)" 
															onkeydown="this.value=this.value.substring(0, 300)" 
															onkeyup="this.value=this.value.substring(0, 300)"></textarea></td>


												</tr>


											</table>
										</div> --%>



									</div>
								</div>

							</div>



							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<div class="col-xs-12">
									<button class="btn btn-primary pull-right m-t-n-xs" id="save"
										type="submit">提交</button>
								</div>
							</div>
						</form>

					</div>
				</div>
			</div>
		</div>
	</div>
</body>

	<script type="text/javascript">
		//var fileUploadIp = $("#fileUploadIp").val();
		window.UEDITOR_UPLOAD_URL = '<%=request.getAttribute("fileUploadIp")%>';
	</script>

	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/jquery.min.js?v=2.1.4"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/bootstrap.min.js?v=3.3.5"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/content.min.js?v=1.0.0"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/toastr/toastr.min.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/layer/layer.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/iCheck/icheck.min.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/views/sysdefault/js/uploadPreview.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/datapicker/bootstrap-datepicker.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/clockpicker/clockpicker.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/plugins/cropper/cropper.min.js"></script>
	<script
		src="<%=request.getContextPath()%>/views/sysdefault/js/demo/form-advanced-demo.min.js"></script>
	<!-- 富文本编辑器 -->
	<script type="text/javascript" charset="utf-8"
		src="<%=request.getContextPath()%>/views/sysdefault/plugins/uEditor/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8"
		src="<%=request.getContextPath()%>/views/sysdefault/plugins/uEditor/ueditor.all.min.js"> </script>
	<script type="text/javascript" charset="utf-8"
		src="<%=request.getContextPath()%>/views/sysdefault/plugins/uEditor/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript">
		var myDate=new Date();
  		 currMonth=myDate.getMonth()+1;
		 currQuarter = Math.floor( ( currMonth % 3 == 0 ? ( currMonth / 3 ) : ( currMonth / 3 + 1 ) ) );
		 $(".Quarter").each(function(){	 
			
			 if($(this).val()==currQuarter){
				$(this).next().removeAttr("disabled");
				$(this).next().css('background-color', 'white');
				}    	
		    });	     
	 	 
	 	 
	</script>
	<script type="text/javascript">
	     
	     $(".group_style").each(function(){	    	
	    	 var height=$(this).height();
	    	 
	    	$(this).children().each(function(){
	    		/*  $(this).css("height":height); */
	    		$(this).height(height)	    	
	    	})	    		    	
	    });	     
	     $(".groupchild").each(function(){	    	
	    	 var height=$(this).height(); 
	    	
	    	  $(this).children().each(function(){
	    		  
		    		$(this).height(height-2); 
		    	
		    	})	 
	    	    		    	
	    });
	     $(".text_style").each(function(){	    	
	    	 var height=$(this).parent().height(); 
	    	 $(this).height(height);
	    	    		    	
	    });
	     function getNowFormatDate() {
	    	    var date = new Date();
	    	    var seperator1 = "年";
	    	    var seperator2 = "月";
	    	    var month = date.getMonth() + 1;
	    	    var strDate = date.getDate();
	    	    if (month >= 1 && month <= 9) {
	    	        month = "0" + month;
	    	    }
	    	    if (strDate >= 0 && strDate <= 9) {
	    	        strDate = "0" + strDate;
	    	    }
	    	    var currentdate = date.getFullYear() + seperator1 + month + seperator2 
	    	    return currentdate;
	    }
	     $(".time").html(getNowFormatDate());
	     $("#reportTime").val(getNowFormatDate());
	     $(".yijian").focus(function(){
	    	  $(this).next().html(function getNowFormatDate() {
	    		    var date = new Date();
	    		    var seperator1 = "年";
	    		    var seperator2 = "月";
	    		    var seperator3 = "日";
	    		    var month = date.getMonth() + 1;
	    		    var strDate = date.getDate();
	    		    if (month >= 1 && month <= 9) {
	    		        month = "0" + month;
	    		    }
	    		    if (strDate >= 0 && strDate <= 9) {
	    		        strDate = "0" + strDate;
	    		    }
	    		    var currentdate = date.getFullYear() + seperator1 + month + seperator2  +strDate +seperator3
	    		    return currentdate;
	    	});
	     });
	</script>
	<script type="text/javascript">
    
    var basePath = '<%=request.getContextPath()%>';

		var imgId = "";
		var inputId = "";

		//初始化富文本编辑器
		var ue = UE.getEditor('editor');

		toastr.options = {
			"closeButton" : true,
			"debug" : false,
			"progressBar" : true,
			"positionClass" : "toast-top-left",
			"showDuration" : "400",
			"hideDuration" : "1000",
			"timeOut" : "3000",
			"extendedTimeOut" : "1000",
			"showEasing" : "swing",
			"hideEasing" : "linear",
			"showMethod" : "fadeIn",
			"hideMethod" : "fadeOut"
		}

		function setShowLength(obj, maxlength, id) {
			var rem = maxlength - obj.value.length;
			var wid = id;
			if (rem < 0) {
				rem = 0;
			}
			document.getElementById(wid).innerHTML = "还可以输入" + rem + "个字符";
		}

		//初始化页面
		$(function() {

			//新闻栏目回显
			var typeInfo = $("#typeInfo").val();
			if (typeInfo != '') {
				var typeInfoList = typeInfo.split(',');
				$("input[name='type']").each(function(i, item) {
					var typeVal = $(this).val();
					var type_self = $(this);
					for ( var typeItem in typeInfoList) {
						if (typeInfoList[typeItem] == typeVal) {
							type_self.attr('checked', true);
							return true;
						}
					}
				});
			}

			//新闻封面图片回显
			var imageInfo = $("#imageInfo").val();
			if (imageInfo != '') {
				$("#imgShow_1").attr("src", imageInfo);
				$("#up_img_1").val(imageInfo);
			}

			$(".i-checks").iCheck({
				checkboxClass : "icheckbox_square-green",
				radioClass : "iradio_square-green",
			});

			new uploadPreview({
				UpBtn : "up_img_1",
				DivShow : "imgdiv_1",
				ImgShow : "imgShow_1"
			});

			new uploadPreview({
				UpBtn : "up_img_6",
				DivShow : "imgdiv_6",
				ImgShow : "imgShow_6"
			});

			new uploadPreview({
				UpBtn : "up_img_7",
				DivShow : "imgdiv_7",
				ImgShow : "imgShow_7"
			});

			//禁止后退键 作用于Firefox、Opera
			document.onkeypress = banBackSpace;
			//禁止后退键  作用于IE、Chrome
			document.onkeydown = banBackSpace;
		});

		var clickImg = function(mInputId, mImgId, imgageCompress) {
			inputId = mInputId;
			imgId = mImgId;

			layer.open({
				type : 2,
				title : "上传图片",
				fix : false, //不固定
				maxmin : false,
				shadeClose : true,
				shade : 0.3,
				area : [ '600px', '430px' ],
				content : basePath + '/common/selectImage.dop?imageCompress='
						+ imgageCompress
			});
		}

		//提交表单前校验
		function beforeSub() {

			//校验新闻栏目
			var newsAllType = $("input[name='type']");
			if (newsAllType.length > 0) {
				var newsType = $("input[name='type']:checked");
				if (newsType.length == 0) {
					toastr.warning("至少选择一个新闻栏目！", "提示");
					return false;
				}

			}

			return true;
		}

		//响应保存至草稿箱
		var drafts = function() {
			document.getElementById("status").value = 3;
			document.getElementById("save").click();
		}

		//弹出框选择回调函数
		var selectCallBack2 = function(data) {
			debugger;
			var obj = jQuery.parseJSON(data);
			var imgList = obj.image.split(',');
			if (imgList.length > 0) {
				$("#" + inputId).val(imgList[0]);
				$("#" + imgId).attr("src", imgList[0]);
			}
			layer.closeAll();
		}

		//处理键盘事件 禁止后退键（Backspace）密码或单行、多行文本框除外
		function banBackSpace(e) {
			var ev = e || window.event;//获取event对象   
			var obj = ev.target || ev.srcElement;//获取事件源   
			var t = obj.type || obj.getAttribute('type');//获取事件源类型  
			//获取作为判断条件的事件类型
			var vReadOnly = obj.getAttribute('readonly');
			//处理null值情况
			vReadOnly = (vReadOnly == "") ? false : vReadOnly;
			//当敲Backspace键时，事件源类型为密码或单行、多行文本的，
			//并且readonly属性为true或enabled属性为false的，则退格键失效
			var flag1 = (ev.keyCode == 8
					&& (t == "password" || t == "text" || t == "textarea") && vReadOnly == "readonly") ? true
					: false;
			//当敲Backspace键时，事件源类型非密码或单行、多行文本的，则退格键失效
			var flag2 = (ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea") ? true
					: false;

			//判断
			if (flag2) {
				return false;
			}
			if (flag1) {
				return false;
			}
		}
		
		/* 返回列表 */
		function backList(){
			location.href="listTable.do";
		}
	</script>


</html>